import { ApiProperty } from '@nestjs/swagger';
import { Column, Entity } from 'typeorm';
import { BaseEntity } from '../../../base.entity';

@Entity({ name: 'sys_user' })
export default class SysUser extends BaseEntity {


  @Column({ unique: true,name:'user_name', comment: '登录账号' })
  @ApiProperty()
  userName: string;

  @Column({ comment: '用户密码' })
  @ApiProperty()
  password: string;

  @Column({ length: 32, comment: '组织' })
  @ApiProperty()
  psalt: string;

  @Column({ name: 'nick_name', nullable: true, comment: '用户名称' })
  @ApiProperty()
  nickName: string;

  @Column({ name: 'head_img', nullable: true, comment: '用户头像' })
  @ApiProperty()
  headImg: string;

  @Column({ nullable: true, default: '', comment: '邮箱' })
  @ApiProperty()
  email: string;

  @Column({ nullable: true, default: '', comment: '电话号码' })
  @ApiProperty()
  phone: string;

  @Column({ nullable: true, default: '', comment: '备注' })
  @ApiProperty()
  remark: string;

  @Column({ type: 'tinyint', nullable: true, default: 1, comment: '状态' })
  @ApiProperty()
  status: number;
}
